<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

    <title>echarts作品</title>
    <script src="https://cdn.bootcss.com/echarts/4.1.0.rc2/echarts.min.js"></script>
    <style>
    .container {
        height: 600px;
        width: 800px;
        margin: 30px auto
    }

    #main {
        height: 600px;
        width: 800px;
        margin: 30px auto;
    }
    </style>

</head>

<body>
        <div class="container">
        <div id="main"></div>
        <div class="panel panel-info">
            <div class="panel-heading">数据来源</div>
            <div class="panel-body">
                <p> 中华人民共和国民政部统计月报省级数据</p>
                <p> 2018年4月份各省社会服务统计数据</p>
            </div>
        </div>
    </div>
    <div id="main" style="width: 1200px;height:800px;"></div>
    <script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));


    // app.title = '折柱混合';

    option = {
        title: {
            text: '2018年4月份部分省社会服务统计数据',
            top: 'bottom',
            left: 'center'
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'cross',
                crossStyle: {
                    color: '#999'
                }
            }
        },
        toolbox: {
            feature: {
                dataView: { show: true, readOnly: false },
                magicType: { show: true, type: ['line', 'bar'] },
                restore: { show: true },
                saveAsImage: { show: true }
            }
        },
        legend: {
            data: ['社会福利支出', '社会救助支出', '城市最低生活保障人数']
        },
            xAxis: [
        {
            type: 'category',
            data: ['北京', '河北', '吉林', '浙江', '江苏', '湖南', '山东', '广西', '贵州', '西藏', '甘肃', '新疆'],
            axisPointer: {
                type: 'shadow'
            }
        }
    ],
    yAxis: [
        {
            type: 'value',
            name: '支出',
            min: 0,
            max: 360000,
            interval: 40000,
            axisLabel: {
                formatter: '{value} 万元'
            }
        },
        {
            type: 'value',
            name: '保障人数',
            min: 0,
            max: 900000,
            interval: 100000,
            axisLabel: {
                formatter: '{value} 人'
            }
        }
    ],
    series: [
        {
            name:'社会福利支出',
            type:'bar',
            data:[59429.8, 37825.4, 10016.7, 80465.1, 191949.5, 27700.6, 64293.9, 27751.4, 24206.1, 0.0, 4822.4, 3114.3]
        },
        {
            name:'社会救助支出',
            type:'bar',
            data:[100897.1, 239812.1, 173786.7, 237848.6, 301518.4, 310279.4, 264954.7, 244008.8, 327136.5, 31826.4, 276254.8, 258636.1]
        },
        {
            name:'城市最低生活保障人数',
            type:'line',
            yAxisIndex: 1,
            data:[75361, 289880, 557671, 232458, 193152, 742386, 223768, 156710, 307281, 32004, 624881, 644233]
        }
    ]
};


    myChart.setOption(option);
    </script>
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

</body> 

</html>
